package router

import (
	apmapi "service/app/api/apmApi"

	"github.com/gin-gonic/gin"
)

func ApmRouteInit() {
	JoinRoutes(func(pubRoute, authRoute *gin.RouterGroup) {
		AmpApi := apmapi.ApmApiInit()
		apmAuth := authRoute.Group("apm")
		apmAuth.GET("", AmpApi.ApmAll)
		apmAuth.POST("", AmpApi.ApmAdd)
		apmAuth.PUT("/:id", AmpApi.ApmEdit)
		apmAuth.DELETE("/:id", AmpApi.ApmDel)
		// 个人用户
		// apmAuth.

		// cost
		costApi := apmapi.CostApiInit()
		costAuth := authRoute.Group("cost")
		costAuth.GET("", costApi.CostAll)
		costAuth.POST("", costApi.CostAdd)
		costAuth.PUT("/:id", costApi.CostEdit)
		costAuth.DELETE("/:id", costApi.CostDel)
		costAuth.GET("/time/:time", costApi.CostSearchTime)
	})

}
